<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>redis数据类型和常用命令 - 豆是不吃豆豉</title><meta name="Description" content="豆是不吃豆豉"><meta property="og:title" content="redis数据类型和常用命令" />
<meta property="og:description" content="redis的键（key） redis常用命令查询： http://redisdoc.com/ 常用命令 描述 备注 keys * 列出当前库所有的key - exists &ldquo;key&rdquo; 判断当前key是否存在 存在返回1，不存在返" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" />
<meta property="og:image" content="https://dou-chi.gitee.io/logo.png"/>
<meta property="article:published_time" content="2019-12-13T16:41:35+00:00" />
<meta property="article:modified_time" content="2019-12-13T16:41:35+00:00" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://dou-chi.gitee.io/logo.png"/>

<meta name="twitter:title" content="redis数据类型和常用命令"/>
<meta name="twitter:description" content="redis的键（key） redis常用命令查询： http://redisdoc.com/ 常用命令 描述 备注 keys * 列出当前库所有的key - exists &ldquo;key&rdquo; 判断当前key是否存在 存在返回1，不存在返"/>
<meta name="application-name" content="豆是不吃豆豉">
<meta name="apple-mobile-web-app-title" content="豆是不吃豆豉"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" /><link rel="prev" href="https://dou-chi.gitee.io/redis%E5%AE%89%E8%A3%85%E5%92%8C%E5%90%AF%E5%8A%A8/" /><link rel="next" href="https://dou-chi.gitee.io/redis%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/" /><link rel="stylesheet" href="/lib/normalize/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="/lib/fontawesome-free/all.min.css"><link rel="stylesheet" href="/lib/animate/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "redis数据类型和常用命令",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/dou-chi.gitee.io\/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4\/"
        },"genre": "posts","keywords": "redis, redis数据类型, redis命令","wordcount":  1603 ,
        "url": "https:\/\/dou-chi.gitee.io\/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4\/","datePublished": "2019-12-13T16:41:35+00:00","dateModified": "2019-12-13T16:41:35+00:00","publisher": {
            "@type": "Organization",
            "name": ""},"author": {
                "@type": "Person",
                "name": "豆是不吃豆豉"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('dark' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'dark' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/" title="豆是不吃豆豉">豆是不吃豆豉</a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/posts/"> 所有文章 </a><a class="menu-item" href="/tags/"> 标签 </a><a class="menu-item" href="/categories/"> 分类 </a><a class="menu-item" href="https://github.com/dou-chi" rel="noopener noreffer" target="_blank"> github </a><a class="menu-item" href="https://gitee.com/dou-chi" rel="noopener noreffer" target="_blank"> gitee </a><span class="menu-item delimiter"></span><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-desktop">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/" title="豆是不吃豆豉">豆是不吃豆豉</a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-mobile">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/posts/" title="">所有文章</a><a class="menu-item" href="/tags/" title="">标签</a><a class="menu-item" href="/categories/" title="">分类</a><a class="menu-item" href="https://github.com/dou-chi" title="" rel="noopener noreffer" target="_blank">github</a><a class="menu-item" href="https://gitee.com/dou-chi" title="" rel="noopener noreffer" target="_blank">gitee</a><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                <i class="fas fa-adjust fa-fw"></i>
            </a></div>
    </div>
</header>
<div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div>
<main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content always-active" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">redis数据类型和常用命令</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>豆是不吃豆豉</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/redis/"><i class="far fa-folder fa-fw"></i>redis</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2019-12-13">2019-12-13</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 1603 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 4 分钟&nbsp;</div>
        </div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#redis的键key">redis的键（key）</a></li>
    <li><a href="#redis数据类型">redis数据类型</a>
      <ul>
        <li><a href="#string字符串">string(字符串)</a>
          <ul>
            <li><a href="#string常用命令">String常用命令</a></li>
          </ul>
        </li>
        <li><a href="#hash哈希">hash(哈希)</a>
          <ul>
            <li><a href="#hash常用命令">hash常用命令</a></li>
          </ul>
        </li>
        <li><a href="#list列表">list(列表)</a>
          <ul>
            <li><a href="#list常用命令">list常用命令</a></li>
          </ul>
        </li>
        <li><a href="#set集合">set(集合)</a>
          <ul>
            <li><a href="#set常用命令">set常用命令</a></li>
          </ul>
        </li>
        <li><a href="#zsetsorted-set有序集合">zset(sorted set：有序集合)</a>
          <ul>
            <li><a href="#zset常用命令">zset常用命令</a></li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><h1 id="redis的键key">redis的键（key）</h1>
<p>redis常用命令查询： <a href="http://redisdoc.com/" title="http://redisdoc.com/" target="_blank" rel="noopener noreffer">http://redisdoc.com/</a></p>
<table>
<thead>
<tr>
<th>常用命令</th>
<th>描述</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>keys *</td>
<td>列出当前库所有的key</td>
<td>-</td>
</tr>
<tr>
<td>exists &ldquo;key&rdquo;</td>
<td>判断当前key是否存在</td>
<td>存在返回1，不存在返回0</td>
</tr>
<tr>
<td>move &ldquo;key&rdquo; &ldquo;db&rdquo;</td>
<td>将当前key移动到db库中</td>
<td>当前库就不存在该key了</td>
</tr>
<tr>
<td>expire &ldquo;key&rdquo; &ldquo;秒&rdquo;</td>
<td>为给定的key设置过期时间</td>
<td>-</td>
</tr>
<tr>
<td>ttl &ldquo;key&rdquo;</td>
<td>查看当前key还有多少秒过期</td>
<td>-1表示永不过期，-2表示已过期</td>
</tr>
<tr>
<td>type &ldquo;key&rdquo;</td>
<td>查看你的key是什么类型</td>
<td>-</td>
</tr>
</tbody>
</table>
<!-- more -->
<h1 id="redis数据类型">redis数据类型</h1>
<h2 id="string字符串">string(字符串)</h2>
<ol>
<li>string类型一个key对应一个value，并且value最大可以存放512M.</li>
<li>string类型是二进制安全的。可以包含任何数据，比如正常的字符串或jpg图片等。</li>
</ol>
<h3 id="string常用命令">String常用命令</h3>
<table>
<thead>
<tr>
<th>常用命令</th>
<th>描述</th>
<th>可选参数</th>
</tr>
</thead>
<tbody>
<tr>
<td>set key</td>
<td>给key设值，如果存在则覆盖</td>
<td>EX:设置过期时间秒，PX：设置过期时间毫秒，NX :不存在才设置，XX：存在才设置</td>
</tr>
<tr>
<td>setnx key</td>
<td>key不存在才设值</td>
<td></td>
</tr>
<tr>
<td>setex</td>
<td>设置key的同时可以设置过期时间秒</td>
<td></td>
</tr>
<tr>
<td>psetex</td>
<td>设置key的同时可以设置过期时间毫秒</td>
<td></td>
</tr>
<tr>
<td>del/append/strlen</td>
<td>删除/追加/长度</td>
<td></td>
</tr>
<tr>
<td>getrange/setrange</td>
<td>获取指定索引内的值/设置指定索引内的值</td>
<td>-</td>
</tr>
<tr>
<td>mset/mget/msetnx</td>
<td>同时设置多个值/ 同时获取多个值/当且仅当所有给定键都不存在时， 为所有给定键设置值</td>
<td>-</td>
</tr>
<tr>
<td>getset</td>
<td>将键 key 的值设为 value ， 并返回键 key 在被设置之前的旧值</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="hash哈希">hash(哈希)</h2>
<p>hash是一个键值对集合,类似Java里面的<code>Map&lt;String,Object&gt;</code></p>
<h3 id="hash常用命令">hash常用命令</h3>
<h2 id="list列表">list(列表)</h2>
<p>list是简单的String列表，按照插入顺序排序。你可以添加一个元素导列表的头部（左边）或者尾部（右边）。底层是通过链接列表实现的，所以在列表的使用中，按索引访问元素的速度非常快（恒定时间索引访问），而在通过链接列表实现的列表中访问速度不是那么快（其中操作需要的工作量与所访问元素的索引成比例）</p>
<h3 id="list常用命令">list常用命令</h3>
<table>
<thead>
<tr>
<th>常用命令</th>
<th>描述</th>
<th>命令</th>
</tr>
</thead>
<tbody>
<tr>
<td>lpush/rpush/lrange</td>
<td>将值压入列表的表头/ 将值压入列表的表尾/ 根据下标获取值</td>
<td></td>
</tr>
<tr>
<td>lpop/rpop</td>
<td>左出栈/ 右出栈</td>
<td></td>
</tr>
<tr>
<td>lindex</td>
<td>按照索引下标获得元素(从上到下)</td>
<td></td>
</tr>
<tr>
<td>lrem</td>
<td>根据参数 count 的值，移除列表中与参数 value 相等的元素。</td>
<td>LREM key count value</td>
</tr>
<tr>
<td>ltrim</td>
<td>只保留指定区间内的元素，不在指定区间之内的元素都将被删除。</td>
<td>LTRIM key start stop</td>
</tr>
<tr>
<td>rpoplpush</td>
<td>移除列表的最后一个元素，并将该元素添加到另一个列表并返回。</td>
<td>RPOPLPUSH source destination</td>
</tr>
<tr>
<td>linsert</td>
<td>将值 value 插入到列表 key 当中，位于值 pivot 之前或之后。。</td>
<td>LINSERT key BEFORE</td>
</tr>
<tr>
<td>lset</td>
<td>将列表 key 下标为 index 的元素的值设置为 value 。</td>
<td>LSET key index value</td>
</tr>
</tbody>
</table>
<h2 id="set集合">set(集合)</h2>
<p>set是String的无序集合。</p>
<table>
<thead>
<tr>
<th>常用命令</th>
<th>描述</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>sadd</td>
<td>将一个或多个 member 元素加入到集合 key 当中</td>
<td>SADD key member [member …]</td>
</tr>
<tr>
<td>smembers</td>
<td>返回所有成员</td>
<td>SMEMBERS key</td>
</tr>
<tr>
<td>SISMEMBER</td>
<td>判断 member 元素是否集合 key 的成员。</td>
<td>SISMEMBER key member</td>
</tr>
<tr>
<td>scard</td>
<td>返回集合 key 的基数(集合中元素的数量)</td>
<td>SCARD key</td>
</tr>
<tr>
<td>SREM</td>
<td>移除集合 key 中的一个或多个 member 元素，不存在的 member 元素会被忽略。</td>
<td>SREM key member [member …]</td>
</tr>
<tr>
<td>SRANDMEMBER</td>
<td>返回集合中的一个或多个随机元素)</td>
<td>SRANDMEMBER key [count]</td>
</tr>
<tr>
<td>SPOP</td>
<td>移除并返回集合中的一个随机元素</td>
<td>SPOP key</td>
</tr>
<tr>
<td>SMOVE</td>
<td>将 member 元素从 source 集合移动到 destination 集合</td>
<td>SMOVE source destination member</td>
</tr>
<tr>
<td>SDIFF/ SINTER/ SUNION</td>
<td>差集/ 交集/ 并集</td>
<td>SDIFF key [key …]/ SINTER key [key …]/ SUNION key [key …]</td>
</tr>
</tbody>
</table>
<h3 id="set常用命令">set常用命令</h3>
<h2 id="zsetsorted-set有序集合">zset(sorted set：有序集合)</h2>
<p>zset是String的有序集合,相比set类型在value前多了一个score, score 值可以是整数值或双精度浮点数</p>
<h3 id="zset常用命令">zset常用命令</h3>
<table>
<thead>
<tr>
<th>常用命令</th>
<th>描述</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>ZADD</td>
<td>将一个或多个 member 元素及其 score 值加入到有序集 key 当中</td>
<td>ZADD key score member [[score member] [score member] …]</td>
</tr>
<tr>
<td>ZRANGE</td>
<td>返回有序集 key 中，指定区间内的成员</td>
<td>ZRANGE key start stop [WITHSCORES]</td>
</tr>
<tr>
<td>ZRANGEBYSCORE</td>
<td>返回有序集 key 中，所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。有序集成员按 score 值递增(从小到大)次序排列</td>
<td>ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]</td>
</tr>
<tr>
<td>ZREM</td>
<td>移除有序集 key 中的一个或多个成员，不存在的成员将被忽略</td>
<td>ZREM key member [member …]</td>
</tr>
<tr>
<td>ZCARD</td>
<td>返回有序集 key 的基数</td>
<td>ZCARD key</td>
</tr>
<tr>
<td>ZCOUNT</td>
<td>返回有序集 key 中， score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。</td>
<td>ZCOUNT key min max</td>
</tr>
<tr>
<td>ZRANK</td>
<td>回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列</td>
<td>ZRANK key member</td>
</tr>
<tr>
<td>ZSCORE</td>
<td>返回有序集 key 中，成员 member 的 score 值</td>
<td>ZSCORE key member</td>
</tr>
<tr>
<td>ZREVRANGE</td>
<td>其中成员的位置按 score 值递减(从大到小)来排列。 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列</td>
<td>ZREVRANGE key start stop [WITHSCORES]</td>
</tr>
<tr>
<td>ZREVRANK</td>
<td>返回有序集 key 中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)排序</td>
<td>ZREVRANK key member</td>
</tr>
</tbody>
</table>
</div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2019-12-13</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"><span>
                            <a class="link-to-markdown" href="/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/index.md" target="_blank">阅读原始文档</a>
                        </span></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令" data-hashtags="redis,redis数据类型,redis命令"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-hashtag="redis"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 WhatsApp" data-sharer="whatsapp" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令" data-web><i class="fab fa-whatsapp fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令"><i data-svg-src="/lib/simple-icons/icons/line.min.svg"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令"><i class="fab fa-weibo fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Myspace" data-sharer="myspace" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令" data-description=""><i data-svg-src="/lib/simple-icons/icons/myspace.min.svg"></i></a><a href="javascript:void(0);" title="分享到 Blogger" data-sharer="blogger" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令" data-description=""><i class="fab fa-blogger fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Evernote" data-sharer="evernote" data-url="https://dou-chi.gitee.io/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" data-title="redis数据类型和常用命令"><i class="fab fa-evernote fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/redis/">redis</a>,&nbsp;<a href="/tags/redis%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B/">redis数据类型</a>,&nbsp;<a href="/tags/redis%E5%91%BD%E4%BB%A4/">redis命令</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/redis%E5%AE%89%E8%A3%85%E5%92%8C%E5%90%AF%E5%8A%A8/" class="prev" rel="prev" title="redis安装和启动"><i class="fas fa-angle-left fa-fw"></i>redis安装和启动</a>
            <a href="/redis%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/" class="next" rel="next" title="redis配置文件">redis配置文件<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
<div id="comments"></div></article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.74.3">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2019 - 2021</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/" target="_blank">豆是不吃豆豉</a></span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="/lib/katex/katex.min.css"><link rel="stylesheet" href="/lib/katex/copy-tex.min.css"><link rel="stylesheet" href="/lib/cookieconsent/cookieconsent.min.css"><script type="text/javascript" src="/lib/smooth-scroll/smooth-scroll.min.js"></script><script type="text/javascript" src="/lib/autocomplete/autocomplete.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.stemmer.support.min.js"></script><script type="text/javascript" src="/lib/lunr/lunr.zh.min.js"></script><script type="text/javascript" src="/lib/lazysizes/lazysizes.min.js"></script><script type="text/javascript" src="/lib/clipboard/clipboard.min.js"></script><script type="text/javascript" src="/lib/sharer/sharer.min.js"></script><script type="text/javascript" src="/lib/katex/katex.min.js"></script><script type="text/javascript" src="/lib/katex/auto-render.min.js"></script><script type="text/javascript" src="/lib/katex/copy-tex.min.js"></script><script type="text/javascript" src="/lib/katex/mhchem.min.js"></script><script type="text/javascript" src="/lib/cookieconsent/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":100},"comment":{},"cookieconsent":{"content":{"dismiss":"同意","link":"了解更多","message":"本网站使用 Cookies 来改善您的浏览体验."},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false},"search":{"highlightTag":"em","lunrIndexURL":"/index.json","lunrLanguageCode":"zh","lunrSegmentitURL":"/lib/lunr/lunr.segmentit.js","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"lunr"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
